<?php
/**
 * 门店的队列任务导入最终执行Lib类
 *
 * @access public
 * @author wangbiao<wangbiao@shopex.cn>
 * @version $Id: import.php 2016-07-26 15:00
 */
class o2o_store_to_import
{
    /**
     * 门店导入的队列任务执行
     *
     * @param String $cursor_id
     * @param Array $params
     * @param String $errmsg
     * @return Boolean
     */
    function run(&$cursor_id, $params, &$errmsg)
    {
        $storeLib        = kernel::single('o2o_store');
        $dataSdf         = $params['sdfdata'];
        
        foreach ($dataSdf as $val)
        {
            #门店数据处理
            $result    = $storeLib->create_store($val, $errmsg);
            if(!$result)
            {
                return false;
            }
        }
        
        return false;
    }
}
